﻿//-----------------------------------------------------------------------
// <copyright file="ChatboxException.cs" company="AFS">
// Copyright (c) AFS. All rights reserved.
//
//    This file is part of Chatbox.
//
//    Chatbox is free software: you can redistribute it and/or modify
//    it under the terms of the GNU Lesser General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    any later version.
//
//    Chatbox is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//    GNU Lesser General Public License for more details.
//
//    You should have received a copy of the GNU Lesser General Public License
//    along with Chatbox. If not, see http://www.gnu.org/copyleft/lesser.html
// </copyright>
//----------------------------------------------------------------------- 

namespace ChatBox.DomainObjects
{
    using System;
    using System.Runtime.Serialization;

    /// <summary>
    /// Class for exceptions thown in Chatbox code
    /// </summary>
    [Serializable]
    public class ChatBoxException : Exception
    {
        /// <summary>
        /// Initializes a new instance of the ChatBoxException class
        /// </summary>
        public ChatBoxException()
        {    
        }

        /// <summary>
        /// Initializes a new instance of the ChatBoxException class with a message
        /// </summary>
        /// <param name="message">the error message</param>
        public ChatBoxException(string message)
            : base(message)
        {   
        }

        /// <summary>
        /// Initializes a new instance of the ChatBoxException class with a message and an inner exception
        /// </summary>
        /// <param name="message">the error message</param>
        /// <param name="innerException">the inner exception</param>
        public ChatBoxException(string message, Exception innerException)
            : base(message, innerException)
        {
        }

        /// <summary>
        /// Initializes a new instance of the ChatBoxException class from streaming
        /// </summary>
        /// <param name="serializationInfo">the Serialization Info</param>
        /// <param name="streamingContext">the Streaming Context</param>
        protected ChatBoxException(SerializationInfo serializationInfo, StreamingContext streamingContext)
            : base(serializationInfo, streamingContext)
        {  
        }
    }
}
